namespace CRMG.Container.Source.DL
{
    using CRMG.Container.Source.BO;
    using CRMG.Container.Source.QO;
    using Guru.Framework.BaseDal;
    using System;
    using System.Collections;
    using System.Data;

    public class StudentTrainDL : BaseDL
    {

        public StudentTrainDL()
        {
        }


        public DataTable GetStudentTrains(int studentId)
        {
            try
            {
                Hashtable h = new Hashtable();
                h.Add("@StudentId", studentId);
                return base.Manager.GetResultSet(Crud.GetStudentTrains(), h).Tables[0];
            }
            catch (Exception exc)
            {
                throw exc;
            }
        }


        internal DataTable GetAvailableTrainsOfStudent(int studentId)
        {
            try
            {
                Hashtable h = new Hashtable();
                h.Add("@StudentId", studentId);
                return Manager.GetResultSet(Crud.GetAvailableTrainsOfStudent(), h).Tables[0];
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}

